using UnityEngine;

public class LiquidPicker : MonoBehaviour
{
	private LiquidSpawner liquidSpawner;

	private GlassFillingUpController glassFillingUpController;

	public void LiquidPicked(string liquidName)
	{
		LiquidType liquidType = LiquidTypes.GetLiquidType(liquidName);
		Liquid liquid = liquidSpawner.SetLiquid(liquidType);
		if (liquid != null)
		{
			glassFillingUpController.AddLiquidToGlass(liquid);
		}
	}

	public void SetUpConnectionsWithGlassObject(GameObject glass)
	{
		liquidSpawner = glass.GetComponent<LiquidSpawner>();
		glassFillingUpController = glass.GetComponent<GlassFillingUpController>();
	}
}
